|
The development of VRML 2.0 has been a long and difficult process. The earliest version of the VRML 2.0 specification arrived on the Web in January 1996. The final version was ratified eight months later on August 4th 1996. Between the first, and final versions of the specification there were 47 revisions formalized as three main drafts called Draft #1, Draft #2, and Draft #3.
This book and CD-ROM discuss the final version of the VRML 2.0 specification and include all available VRML 2.0 software as of late September 1996. The long and complicated VRML 2.0 specification process, the constant media attention, and the growing excitement over VRML 2.0's new features mean that software developers have been under tremendous pressure to produce software quickly and correctly. Inevitably, some of this software has bugs or does not fully support some features of VRML 2.0. This may mean that some of the examples discussed in the book or contained on this CD-ROM, may not work as expected on some VRML 2.0 browsers. In this document are a few suggested workarounds for some common bugs.
The TimeSensor, AudioClip, and MoveTexture nodes all support the use of startTime and stopTime fields to set the time at which an animation, sound, or movie texture should start and stop. The default values for these fields are zeroes. As discussed in the book, when the stop time is less than or equal to the start time, the stop time is ignored. If the loop field value is TRUE, the animation, sound, or movie texture should start immediately when your VRML browser reads the VRML world.
We have observed that some VRML browsers do not properly ignore the stop time when it is equal to the start time. When any CD-ROM animation, sound, or movie texture example is read by such a browser, the animation will not start automatically. You can get around this browser bug by setting the startTime field to any value greater than the stopTime field. For example, the following TimeSensor node uses this workaround to force an animation to run automatically, even in a VRML browser exhibiting the start-time bug.
DEF Clock TimeSensor { cycleInterval 4.0 loop TRUE startTime 1 stopTime 0 }
Note: The behavior of animation and sound nodes when the start and stop times are equal is the result of a subtle change made to the VRML 2.0 specification in one of the last revisions. Earlier versions of the VRML 2.0 specification required that the start time be greater than the stop time for the stop time to be ignored. This subtle specification change is the likely cause of the start-time bug in some VRML browsers.
The size field of the FontStyle node enables you to select a font size to use when building text shapes. The default value for the size field is 1.0, which creates text shapes comparable in size to the default primitive shapes built by the Box, Cone, Cylinder, and Sphere nodes.
Some VRML browsers use a default font size of 10.0 instead of 1.0. This CD-ROM includes several text-shape examples that depend on the default font size of 1.0. When displayed by browsers with the font-size bug, the text in these examples will appear too large or jumbled together. You can get around this browser bug by setting the size field to 1.0 in a FontStyle node used by example text shapes. For example, the following FontStyle node uses this workaround to ensure the correct default font size:
Text { fontStyle FontStyle { size 1.0 } string "Hello World" }
Note: In VRML 1.0 (defined in 1995) the default font size was 10.0. In VRML 2.0, the default font size is a more intuitive 1.0. This subtle specification change is the likely cause of the font-size bug in some VRML browsers.
The default value of the position field of the Viewpoint node is (0.0, 0.0, 10.0). If your world does not contain a Viewpoint node, then the VRML browser positions the initial viewpoint using this default position.
Some VRML browsers compute their own default viewpoint position so that when viewers enter a world, they can see the entire world neatly centered within the borders of the application window. This default centering effect is sometimes handy, but it does not conform to the VRML specification and may cause undesired viewpoint positions when some of this CD-ROM's examples are viewed. You can get around this browser bug by adding a Viewpoint node to the VRML world. For example, the following Viewpoint node sets the default viewpoint position for a world:
DEF DefaultViewpoint Viewpoint { position 0.0 0.0 10.0 description "Default Viewpoint" }
Note: In VRML 1.0, most VRML browsers exhibited this automatic world centering behavior, and it was considered a good feature. In VRML 2.0, the default (0.0, 0.0, 10.0) viewpoint position and behavior is detailed in the specification. This specification change is the likely cause of the viewpoint automatic-centering bug in some VRML browsers.
The VRML 2.0 specification states that VRML browsers are not required to support any particular program scripting language. However, if a VRML browser supports Java or JavaScript, then it is required to conform to the detailed API descriptions included in the VRML 2.0 specification.
The lack of a required program scripting language in VRML 2.0 is both good and bad. The lack is good, because it allows VRML browser vendors to explore any of several possible program script languages, including Java, JavaScript, Perl, TCL, and Visual Basic. The lack of a required program script language is bad, because it makes it difficult to construct complex VRML 2.0 worlds that use program scripts and be assured that those worlds will be viewable by anybody on the Web.
Most VRML browser vendors have plans to support both Java and JavaScript as available program script languages. In the book, and in the program script examples on this CD-ROM, JavaScript is used. Some VRML browsers, however, do not currently support JavaScript. As a result, examples on this CD-ROM that use JavaScript will not run properly in these browsers. You can get around this browser limitation by converting the JavaScript program scripts to a language supported by the VRML browser you are using.
Cosmo Player, from Silicon Graphics (SGI), provides support for a custom program script language called "VRML Script." This language is very similar to JavaScript. You can convert all of this CD-ROM's JavaScript program scripts to VRML Script by simply changing the URL language tag from javascript to vrmlscript. For example, the following Script node refers to an SGI VRML Script program script instead of a JavaScript program script:
DEF Mover Script { url "vrmlscript: function set_fraction( fraction, eventTime ) { value_changed[0] = fraction; value_changed[1] = Math.sin( fraction * 6.28 ); value_changed[2] = Math.cos( fraction * 6.28 ); }" eventIn SFFloat set_fraction eventOut SFVec3f value_changed }
Some VRML browsers currently do not support all features described by the VRML 2.0 specification. Below we provide a brief list of features commonly omitted from Beta and first-release implementations of VRML 2.0 browsers. Some of the examples on this CD-ROM will fail to work properly on browsers that do not support these features.
Note: The list above provides a combined list of unsupported features for all observed VRML 2.0 browsers. Please see the release notes for individual VRML 2.0 browsers to see what they support and don't support.